/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.company.regis.services.impl;

import com.company.common.dao.AmphurDao;
import com.company.common.dao.DistricDao;
import com.company.common.dao.ProvinceDao;
import com.company.regis.db.entity.Amphur;
import com.company.regis.db.entity.District;
import com.company.regis.db.entity.Province;
import com.company.regis.services.DropDownServices;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author totoland
 */
@Service("dropDownServices")
public class DropDownServicesImpl implements DropDownServices {

    @Autowired
    ProvinceDao provinceDao;
    @Autowired
    AmphurDao amphurDao;
    @Autowired
    DistricDao districDao;

    @Override
    public List<Province> getAllProvince() {
        return provinceDao.getAllProvince();
    }

    @Override
    public List<Amphur> getAmphurByProvinceId(String provinceId) {
        return amphurDao.getAmphurByProvinceId(provinceId);
    }

    @Override
    public List<District> getDistrictByAmphurId(String amphurId) {
        return districDao.getDistrictByAmphurId(amphurId);
    }

}
